home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 422_01 / test3.asm < prev    next >
Encoding:
Assembly Source File  |  1994-03-21  |  425 b   |  16 lines

  1. *
  2. * EMILY test program: Init data memory with value in A
  3. *
  4. * Use the 'C'hange register command to set the initial value in A
  5. *
  6.     ORG    $0800
  7. BEGIN    MOV    DPTR,#0        Begin at zero
  8.     MOV    R2,#0        Low counter
  9.     MOV    R3,#0        High counter
  10. WRMEM    MOVX    [DPTR],A    Write the value
  11.     INC    DPTR        Advance
  12.     DJNZ    R2,WRMEM    Loop 256 times
  13.     DJNZ    R3,WRMEM    LOOP 256*256 times
  14. * Insert the ILLEGAL opcode to halt the simulation
  15.     DB    $A5        Halt emily
  16.